package com.sun.jdk.stream;

import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * Stream接口的常用方法
 */
public class StreamTest19Concat {
    public static void main(String[] args) {

       // concat方法（两个流合并成一个新的流）
        Stream<String> stringStream1 = Stream.of("a", "b", "c");
        Stream<String> stringStream2 = Stream.of("x", "y", "z");
        
        Stream.concat(stringStream1,stringStream2).forEach(System.out::println);
    }
}
